export function tcrParseAmount(amount, len = 2) {
  try {
    if (amount == 0) {
      return '0.00'
    }
    if (!amount) {
      return '0.00'
    }
    if (!isNaN(Number(amount))) {
      return Number(amount).toFixed(len);
    }
  } catch (e) {
    console.log('金额不合规：', e)
  }
  return '0.00'
}

export function tcrParseInt(amount) {
  try {
    if (amount == 0) {
      return '0'
    }
    if (!amount) {
      return '0'
    }
    if (!isNaN(parseInt(amount))) {
      return parseInt(amount);
    }
  } catch (e) {
    console.log('数值不合规：', e)
  }
  return '0'
}
